<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>v-if和v-show</title>
</head>
<body>
<div id="app">
  <p v-show="msg">孙悟空</p>
  <p v-if="msg">小白龙</p>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.21/dist/vue.min.js"></script>
<script>
  let vm = new Vue({
    el: "#app",
    data: {
      msg: true
    }
  })
</script>
</body>
</html>